package cn.cs.service;

import cn.cs.mapper.AgentUserForOrderDBMapper;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@RestController
public class AgentUserForOrderDBService {
    @Resource
    private AgentUserForOrderDBMapper agentUserForOrderDBMapper;

    @RequestMapping(value = "/getRepOrderDetail", method = RequestMethod.POST)
    Map<String,Object> getRepOrderDetail(@RequestBody Map<String, Object> param){
        return  agentUserForOrderDBMapper.getRepOrderDetail(param);
    }

    @RequestMapping(value = "/getAgentEarList", method = RequestMethod.POST)
    List<Map<String,Object>> getAgentEarList(Map<String, Object> param){
        return agentUserForOrderDBMapper.getAgentEarList(param);
    }
    @RequestMapping(value = "/getTodayEar", method = RequestMethod.POST)
    String getTodayEar(@RequestBody Map<String, Object> param){
        return agentUserForOrderDBMapper.getTodayEar(param);
    }

    @RequestMapping(value = "/getAllEarning", method = RequestMethod.POST)
    String getAllEarning(@RequestBody Map<String, Object> area){
        return agentUserForOrderDBMapper.getAllEarning(area);
    }

    @RequestMapping(value = "/getProfitOfLevlB", method = RequestMethod.POST)
    List<Map<String,Object>> getProfitOfLevlB(@RequestBody Map<String, Object> param){
        return agentUserForOrderDBMapper.getProfitOfLevlB(param);
    }

    @RequestMapping(value = "/getProsByShopId", method = RequestMethod.POST)
    List<String> getProsByShopId(@RequestBody Map<String, Object> para){
        return agentUserForOrderDBMapper.getProsByShopId(para);
    }

    @RequestMapping(value = "/getMainPros", method = RequestMethod.POST)
    List<Map<String,Object>> getMainPros(){
        return agentUserForOrderDBMapper.getMainPros();
    }
}
